const fs = require('fs')
const glob = require('glob')
const sharp = require('sharp')
const path = require('path')

const img1 = path.resolve('./files/北京现代-常州明盛_04.jpg')
const img2 = path.resolve('./files/北京现代-常州明盛_05.jpg')
const img3 = path.resolve('./files/北京现代-常州明盛_06.jpg')

sharp(img1)
  .composite([
    {
      input: img2,
      top: 0,
      left: 0
    }
  ])
  .toFile(img3)
  .then((res) => {
    console.log(`拼接成功`)
  })
  .catch((err) => {
    console.log(`拼接失败`, err)
  })
